package com.yuhanginfo.modules.web.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yuhanginfo.common.service.WebCrudService;
import com.yuhanginfo.modules.web.dao.WebEnquiryGoodsDao;
import com.yuhanginfo.modules.web.entity.WebEnquiryGoods;

/**
 * 询价管理Service
 * @author yangs
 * @version 2017-11-23
 */
@Service
@Transactional(readOnly = true)
public class WebEnquiryGoodsService extends WebCrudService<WebEnquiryGoodsDao, WebEnquiryGoods> {
    @Autowired
    private WebEnquiryGoodsDao enquiryGoodsDao;

	public List<WebEnquiryGoods> selectEnquiryList() {
		
		return enquiryGoodsDao.selectEnquiryList();
	}
    
	@Transactional(readOnly = false)
	public void saveEnquiry(WebEnquiryGoods enquiryGoods) {
		
		enquiryGoodsDao.saveEnquiry(enquiryGoods);
	}

	public List<WebEnquiryGoods> selectByUserId(WebEnquiryGoods webEnquiryGoods) {
	
		return enquiryGoodsDao.selectByUserId(webEnquiryGoods);
	}

	public List<WebEnquiryGoods> selectByCode(String code) {
		
		return enquiryGoodsDao.selectByCode(code);
	}

	public WebEnquiryGoods selectById(String id) {
		
	 return enquiryGoodsDao.selectById(id);
	}
	
}